package edu.zut.cs.software.estateagent.property.service;

import java.util.ArrayList;
import java.util.List;

import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import edu.zut.cs.software.base.service.GenericGenerator;
import edu.zut.cs.software.estateagent.property.domain.Holder;
import edu.zut.cs.software.estateagent.property.service.HolderManager;

public class HolderEntityGenerator extends GenericGenerator {
	
	List<Holder> holderList;
	
	HolderManager holderManager;
	
	@Autowired
	public void setHolderManager(HolderManager holderManager) {
		this.holderManager = holderManager;
	}
	
	@Before
	public void setUp() throws Exception {
		this.holderList = new ArrayList<Holder>();
	}
		
		@Test
		public void test() {
			this.holderManager.save(this.holderList);
			List<Holder> result = this.holderManager.findAll();
			if (logger.isInfoEnabled()) {
				logger.info("test() - List<Holder> result=" + result); //$NON-NLS-1$
			}
		}

}
